<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no"/>
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta name="renderer" content="webkit">
    <meta name="format-detection" content="telephone=no">
    <meta name="csrf-param" content="_homeCSRF">
    <meta name="csrf-token" content="RkJLbXljbG93b3M5JjsZG3MsCidNDg4lISl9DApUKBwCcBgnQCoEXw==">
    <title>社会责任</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link href="../src/img/favicon.ico" rel="shortcut icon">
    <link href="/images/favicon.ico" rel="bookmark">
    <link href="../src/css/jquery.bxslider.css" rel="stylesheet">
    <link href="../src/iconfonts/iconfont.css" rel="stylesheet">
    <link href="../src/css/bootstrap.css" rel="stylesheet">
    <link href="../src/css/dookayui.css" rel="stylesheet">
    <link href="../src/css/dx.css" rel="stylesheet">
    <link href="../src/css/dy.css" rel="stylesheet">
    <!--[if lte IE9]>
    <script src="../src/js/html5shiv.js"></script>
    <![endif]-->
    <!--[if lte IE9]>
    <script src="../src/js/respond.min.js"></script>
    <![endif]-->

    <link rel="stylesheet" href="../src/css/swiper-4.2.2.min.css">
    <link rel="stylesheet" href="../src/css/special-reset.css">
    <script src="../src/js/jquery-2.1.4.js"></script>
    <script src="../src/js/swiper-4.2.2.min.js"></script>
</head>
<body class="bg-gray">

<div class="header"></div>

<div class="dx-content">
<div class="container group-news">

    <div class="title mb-5 pengxin-news-title">
        <h2 class="font-20 english-title"></h2>
        <p class="font-20 article-title"></p>
    </div>

    <div class="title mb-5 pengxin-news-title" style="display: block; width: auto;">
        <div class="corporate-img">
            <!--<img src="../src/img/new.jpg" alt="">-->
        </div>
    </div>

</div>
</div>




<footer class="footer"></footer>
<script>

    //获取路由
    function serilizeURL(url) {
        var rs = url.split("?")[1];
        var arr = rs.split("&");
        var json = {};
        for (var i = 0; i < arr.length; i++) {
            if (arr[i].indexOf("=") != -1) {
                json[arr[i].split("=")[0]] = arr[i].split("=")[1];
            }
            else {
                json[arr[i]] = "undefined";
            }
        }
        return json;
    }
    var url = location.href;

    var pid = serilizeURL(url).pid;  //一级菜单栏id
    var secondMenuId = serilizeURL(url).secondMenuId;  //二级菜单栏id
    var swiper = new Swiper('.swiper-container', {
        zoom: true,
        observer:true,
        observeParents:true,
        autoplay:{
            stopOnLastSlide: true,
        },
        pagination: {
            el: '.swiper-pagination',
            clickable: true,
        },
    });

    var cid;

    //获取所有panel
    function getCurrentPageImg(pid) {

        var panelLists;
        var panelListsLength;

        $.ajax({
            url: "http://192.168.100.181:8080/api/columnInfo/getColumnListByPid/" + pid,
            success: function (data) {
                getColumnListByPid = data.data;
                getColumnListByPidLength = getColumnListByPid.length;
                cid=getColumnListByPid[0].id;

                if(undefined==secondMenuId){
                    $.ajax({
                        url: "http://192.168.100.181:8080/api/banner/" + cid +"/head-04/10",
                        success: function (data) {

                            panelLists=data.data;
                            panelListsLength=panelLists.length;
                            for (var i = 0; i < panelListsLength; i++) {
                                $('.corporate-img').append(`
                           <img src=${panelLists[i].bannerImg} style="width: 100%">
                        </div>
                    `);
                            }
                        }});
                }else{
                    $.ajax({
                        url: "http://192.168.100.181:8080/api/banner/" + secondMenuId +"/head-04/10",
                        success: function (data) {

                            panelLists=data.data;
                            panelListsLength=panelLists.length;

                            console.log("http://192.168.100.181:8080/api/banner/" + secondMenuId +"/head-04/10");
                            for (var i = 0; i < panelListsLength; i++) {
                                $('.corporate-img').append(`
                           <img src=${panelLists[i].bannerImg} style="width: 100%">
                        </div>
                    `);
                            }
                        }});
                }



            }
        })

    }

    setTimeout(function () {

        var text = $($('.active')[2])[0].innerText;
        $('.english-title').html($($('.active')[2]).data('english'));
        $('.article-title').html(text);
        document.title = text;
    },1000)



    getCurrentPageImg(pid);
</script>
<script>

    $(document).ready(function () {

        $(".header").load("http://192.168.100.181:8080/huoge-edu/public-file/secondMenu-header.html", function () {
            $(".px-mobile .dy-nav .bread").on("click", function () {
                $(".px-mobile .main-nav").slideToggle("slow");
            });
        });
        $(".footer").load("http://192.168.100.181:8080/huoge-edu/public-file/footer.html");
    });
</script>
</body>
</html>